/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-08-25     wyj       the first version
 */
#ifndef _DISTANCE_SENSOR_HPP_
#define _DISTANCE_SENSOR_HPP_

#include "drivers_module.hpp"

typedef enum
{
    tof200_status_ok,
    tof200_status_fail,
} tof200_status;


class TOF200
{
private:

    CHIP_UART *uart;

    tof200_status init_flag;
    uint8_t debug_flag;
    void _tof200_send_message(uint32_t data_len,uint8_t* data_buff)
    {
        uart->CHIP_UART_send(data_len, data_buff);
    }

    chip_uart_message* _tof200_receive_message(uint32_t timeout)//使用后需要delete返回值
    {
        return uart->CHIP_UART_read_receive(timeout);
    }

public:
    TOF200(CHIP_UART *uart);
    ~TOF200();


};


#endif /* _DISTANCE_SENSOR_HPP_ */
